/**
 * 
 */
package com.cqan.service.rest;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;

import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description TODO
 * @author slaton.wu@gmail.com
 * @date 2012-7-5下午12:59:53
 *
 */
public class BaseRestService {
	
	protected static Logger logger = LoggerFactory.getLogger("ds.debug");
	
	@Context  
    protected HttpServletRequest req;  
	
	protected String encodeing(String content){
		if (content==null) {
			return StringUtils.EMPTY;
		}
		try {
			return   new String(content.getBytes("ISO8859-1"),"UTF-8");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return StringUtils.EMPTY;
	}
}
